//
//  NSDictionary+ExtensionMethods.m
//  EJEG
//
//  Created by lidp on 2016/12/22.
//  Copyright © 2016年 zhaozj. All rights reserved.
//

#import "NSDictionary+ExtensionMethods.h"

@implementation NSDictionary (ExtensionMethods)

+ (NSMutableDictionary *)filterNullFieldFromDict:(NSDictionary *)dict{
    NSMutableDictionary *newDict = [NSMutableDictionary dictionaryWithDictionary:dict];
    [newDict enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL * stop) {
        if ([obj isKindOfClass:[NSNull class]]) {
            newDict[key] = @"";
        }
    }];
    return newDict;
}

@end
